/**
 * Copyright (c) 2010-2011 julewa.com.  
 * All rights reserved. 
 * 
 * @author Huang Benhua
 * @date 2011-2-20
 * 
**/
package com.julewa.freemarker.method;


//一些可能常用的方法
public class FM_UTILS {
	
	public String DoubleFormat(Double d){
		if(d == null)return "";
		if(d.isNaN())return "";
		String str = d.toString();
		if(str.endsWith(".0")){
			return str.substring(0, str.length() - 2);
		}
		return str;
	}
	
	public String FloatFormat(Float d){
		if(d == null)return "";
		if(d.isNaN())return "";
		String str = d.toString();
		if(str.endsWith(".0")){
			return str.substring(0, str.length() - 2);
		}
		return str;
	}
	
	public String getQ1(){
		return "'";
	}
	
	public String getSingleQuoteSign(){
		return "'";
	}
	
	public String getQ2(){
		return "\"";
	}
	
	public String getDoubleQuoteSign(){
		return "\"";
	}
	
	public String getLT(){
		return "<";
	}
	
	public String getLessThanSign(){
		return "<";
	}
	
	public String getGT(){
		return ">";
	}
	
	public String getGreateThanSign(){
		return ">";
	}
	
	public String getSpaceSign(){
		return "&nbsp;";
	}

}
